package com.foryou.wechat.model.dto;

import com.foryou.wechat.utils.Validator;
import lombok.AllArgsConstructor;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * Created by Lee.
 */
@Data
public class InviteInfoDTO {

    @NotNull(message="发布人用户ID不能为空")
    private Long toUserId;

    @NotNull(message="业务ID不能为空")
    private Long businessId;

    @NotBlank(message="用户手机号码不能为空")
    @Pattern(regexp= Validator.REGEX_MOBILE,message="用户手机号码格式不正确")
    @Length(min=11,max = 11,message="手机号必须为11位")
    private String phone;

    private String weChat;

    private String weibo;

    @NotBlank(message="约拍理由不能为空")
    @Length(min=1,max = 100,message="约拍理由长度不能超过200个单位")
    private String reason;

}
